

class Fonte{


  float v_corps;
  String v_mot;
  float x;
  float y;
  Fonte(float p_corps, String p_mot){
    v_corps = p_corps;
    v_mot = p_mot;
    //maFonte = createFont("data/AGaramondPro-Regular.otf", 5*v_corps-16);
  }

  void ecrit() {
    fill(0,random(50,90));    

    textFont(maFonte);

    float v_largeur = textWidth(v_mot);
    float x = random(width-v_largeur);
    float y = random(1.5*v_corps,height-1.5*v_corps);
    text(v_mot, x, y);
  }

  void bouge() {
    float v_largeur = textWidth(v_mot);
    
    float centreX = (width/2)-(v_largeur/2);
    float centreY = (height/2)+(v_corps/2);

    float x = centreX+random(-0.9*centreX,0.9*centreX);
    float y = centreY+random(-0.85*centreY,0.85*centreY);
    

    text(v_mot, x, y);
    /*println(x);
     println(y);
     println("---------------------");*/
  }
}





